home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Utilities Experience
/
The Utilities Experience - Volume 1.iso
/
software
/
demos
/
r-z
/
sbase4pro
/
ideas
/
sbpro_to_splan.sbp
< prev
next >
Wrap
Text File
|
1995-07-10
|
2KB
|
82 lines
SBP
ÿ½ **********************************************************************
ÿ½ Demonstration of Superbase controlling Superplan through ARexx
ÿ½ Author: Tim Arnot 13/10/88
ÿ½ Superplan should already be running in the system
ÿ½ ARexx, however is optional in this example
ÿ½ **********************************************************************
ÿ½ this is the command sequence to send to Superplan
ÿ½ >POF /* Turn prompt display off */
ÿ½ /zy /* Clear the worksheet */
ÿ½ ,bar>ENT /* Put graph command in cell A1 */
ÿ½ =C1>ENT /* Move to C1 */
ÿ½ +rand*10>ENT /* Put data in C1 */
ÿ½ /rrC1,D1:G1>ENT /* Replicate top row */
ÿ½ >HOM /* Move to A1 */
ÿ½ /rrA1:G1,A2:A6>ENT /* Replicate top row */
ÿ½ /vs>ESC /* Open graph window */
ÿ½ >GPX0>GPY0 /* Move graph window to 0,0 */
ÿ½ >GPW640>GPH260 /* Size graph as big as possible */
ÿ½ /vs>ESC /* Redraw the graph */
ÿ½ >IFFmygraph.iff\ /* Save the graph in IFF format */
ÿ">POF","/zy",",bar>ENT","=C1>ENT","+rand*10>ENT"
ÿ"/rrC1,D1:G1>ENT",">HOM","/rrA1:G1,A2:A6>ENT","/vs>ESC"
ÿ">GPX0>GPY0",">GPW640>GPH260","/vs>ESC",">IFFmygraph.iff\"
ÿi%ÿ1ÿq13
ÿ¼cmd$
ÿ"SpRexx"ÿcmd$
ÿ¡ÿ&ÿ0ÿÿ&ÿÿ1ÿpÿwehandle
ÿ±i%
ÿ½ Now we will read the spreadsheet back into Superbase
ÿ×array%(6,5),c$(5)
ÿ"C","D","E","F","G"
ÿi%ÿ1ÿq5:ÿ¼c$(i%):ÿ±
ÿi%ÿ1ÿq6
ÿj%ÿ1ÿq5
cell$ÿc$(j%)ÿÿH(ÿ(i%,"9."))
ÿ"SpRexx"ÿÃcell$ÿqresult$
ÿ¡ÿ&ÿ0ÿÿ&ÿÿ1ÿpÿwehandle
array%(i%,j%)ÿÿ0(result$)
ÿ±j%
ÿ±i%
ÿ½ Display the results
ÿ
ÿi%ÿ1ÿq6
ÿj%ÿ1ÿq5
ÿ{&1.6array%(i%,j%);
ÿ±j%
ÿ{
ÿ±i%
ÿÏÿ10
ÿÈ"mygraph.iff"
ÿÏÿ10
ÿÈ
ÿ½ Clear Superplan and finish
ÿ"SpRexx"ÿ"/zy>ENT>PON"
ÿ¡ÿ&ÿ0ÿÿ&ÿÿ1ÿpÿwehandle
ÿ""ÿ
ÿ
ehandle:
ÿ¡ÿ&ÿÿ1ÿp
ÿ
ÿÂ"Superplan is not responding","Please run it first",0,a%
ÿ
ÿÿ¡
e$ÿ"Number"ÿÿ(ÿ&)
ÿÂ"Superplan returned an error:",e$,0,a%
ÿ